package com.x.client.model;

import com.x.framework.annotation.MappingColumn;
import com.x.framework.annotation.MappingTable;
import com.x.framework.model.BaseObject;
import org.springframework.format.annotation.DateTimeFormat;
import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * 车辆收藏
 */
@MappingTable(tableName = "CLIENT_CAR_FAVORITE")
public class CarFavorite extends BaseObject {

	private static final long serialVersionUID = 4062162944698343674L;

	@MappingColumn(columnName = "FAVORITE_ID", columnPk = true, columnLength = 32)
	private String carFavoriteId;// 收藏ID

	@NotNull(message = "用户ID不能为空！")
	@MappingColumn(columnName = "USER_ID")
	private String userId;// 用户ID

	@NotNull(message = "车辆ID不能为空！")
	@MappingColumn(columnName = "CAR_ID")
	private String carId;// 车辆ID

	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@MappingColumn(columnName = "FAVORITE_CREATE_TIME")
	private Date favoriteCreateTime;// 收藏时间

	public String getCarFavoriteId() {
		return carFavoriteId;
	}

	public void setCarFavoriteId(String carFavoriteId) {
		this.carFavoriteId = carFavoriteId;
	}

	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	public String getCarId() {
		return carId;
	}

	public void setCarId(String carId) {
		this.carId = carId;
	}

	public Date getFavoriteCreateTime() {
		return favoriteCreateTime;
	}

	public void setFavoriteCreateTime(Date favoriteCreateTime) {
		this.favoriteCreateTime = favoriteCreateTime;
	}
}
